#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>

using namespace std;

struct ListNode {
    int val;
    ListNode* next;
    ListNode(int x) : val(x), next(NULL) {}
};

class Node {
   public:
    int val;
    Node* next;
    Node* random;

    Node(int _val) {
        val = _val;
        next = NULL;
        random = NULL;
    }
};

struct TreeNode {
    int val;
    TreeNode* left;
    TreeNode* right;
    TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};

class Solution {
   public:
    vector<int> constructArr(vector<int>& a) {
        vector<int> left(a.size(), 1);
        vector<int> right(a.size(), 1);
        int left_accu = 1;
        int right_accu = 1;
        for (int i = 0; i < a.size(); i++) {
            left[i] = left_accu;
            left_accu *= a[i];
        }
        for (int i = a.size() - 1; i >= 0; i--) {
            right[i] = right_accu;
            right_accu *= a[i];
        }
        for (int i = 0; i < left.size(); i++) {
            left[i] *= right[i];
        }
        return left;
    }
};

int main() {
    cout << "Hello, World!";
    vector<int> a;
    a.push_back(1);
    a.push_back(2);
    a.push_back(3);
    a.push_back(4);
    a.push_back(5);
    Solution().constructArr(a);
    return 0;
}
